home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _GUICtrlComboShowDropDown.au3 < prev    next >
Text File  |  2007-09-08  |  779b  |  28 lines

  1. #include <GuiConstants.au3>
  2. #include <GuiCombo.au3>
  3.  
  4. Opt('MustDeclareVars',1)
  5.  
  6. Dim $Label,$Input,$Btn_Show,$Btn_Hide,$Combo,$Btn_Exit,$msg,$ret
  7.  
  8. GuiCreate("ComboBox Show Dropdown", 392, 254)
  9.  
  10. $Combo = GuiCtrlCreateCombo("", 70, 10, 270, 120)
  11. GUICtrlSetData($Combo,"AutoIt|v3|is|freeware|BASIC-like|scripting|language")
  12. $Btn_Show = GuiCtrlCreateButton("Show", 80, 140, 90, 30)
  13. $Btn_Hide = GuiCtrlCreateButton("Hide", 220, 140, 90, 30)
  14. $Btn_Exit = GuiCtrlCreateButton("Exit", 150, 180, 90, 30)
  15. GuiSetState()
  16. While 1
  17.     $msg = GuiGetMsg()
  18.     Select
  19.         Case $msg = $GUI_EVENT_CLOSE Or $msg = $Btn_Exit
  20.             ExitLoop
  21.         Case $msg = $Btn_Show
  22.             _GUICtrlComboShowDropDown($Combo,1)
  23.         Case $msg = $Btn_Hide
  24.             _GUICtrlComboShowDropDown($Combo,0)
  25.     EndSelect
  26. WEnd
  27. Exit
  28.